package edu.pitt.myptm.scheduler;

public class LockTuple {

//	int transactionID;
//	String operationType;
	int operationType;//not for lock table. for lock_holder_waitting_list
	String file_name;
	int record_ID;
	 
	public boolean equals(Object o) {
		LockTuple t = (LockTuple)o;
//		System.out.println("DD "+this.file_name +" "+ t.file_name+" "+ this.record_ID+" "+ t.record_ID);
//		System.out.println(this.file_name.equals(t.file_name));
//		System.out.println(this.record_ID==t.record_ID);
		if((this.file_name.equals(t.file_name))
				&&(this.record_ID==t.record_ID)) {
			System.out.println("!!!!!!!!!!!!!!!!!!!!!!");
			return true;
		}
		System.out.println("not match!!!!!!!!!!!!!!!!!!!!!!");
		return false;
	}
	
	public int hashCode() {
	    int hash = this.file_name.hashCode();
	    hash = hash * 300 + record_ID;
//	    hash = hash * 300 + this.record_ID.hashCode();
	    return hash;
	}
}
